home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d20
/
mip_100.arc
/
FOSSIL.PAS
next >
Wrap
Pascal/Delphi Source File
|
1991-01-18
|
2KB
|
83 lines
Unit Fossil;
Interface
Uses
Dos;
Var
Msr : Registers;
Function F_Intr_14(Ax_Input : Word) : Word;
Procedure P_Intr_14(Ah, Al : Byte);
Function SignOn : Boolean;
Procedure SignOff;
Procedure RaiseDtr;
Procedure LowerDtr;
Procedure SetParameters(BaudRate : String);
Function Status : Integer;
Function CD : Boolean;
Procedure ClearReceiveBuffer;
Implementation
{========================================================================}
Function F_Intr_14(Ax_Input : Word) : Word;
Begin
With Msr Do
Begin
Ax := Ax_Input; Dx := 0; Intr($14,Msr); F_Intr_14 := Ax;
End;
End;
{========================================================================}
Procedure P_Intr_14(Ah, Al : Byte);
Begin
Msr.Ah := Ah; Msr.Al := Al; Msr.Dx := 0; Intr($14,Msr);
End;
{========================================================================}
Function SignOn : Boolean;
Begin
If F_Intr_14($0400) = $1954 Then SignOn := True Else SignOn := False;
End;
{========================================================================}
Procedure SignOff;
Begin
P_Intr_14($05,$00);
End;
{========================================================================}
Procedure RaiseDtr;
Begin
P_Intr_14($06,$01);
End;
{========================================================================}
Procedure LowerDtr;
Begin
P_Intr_14($06,$00);
End;
{========================================================================}
Procedure SetParameters(BaudRate : String);
Begin
If BaudRate = '300' Then P_Intr_14($00,$43);
If BaudRate = '1200' Then P_Intr_14($00,$83);
If BaudRate = '2400' Then P_Intr_14($00,$A3);
If BaudRate = '9600' Then P_Intr_14($00,$E3);
End;
{========================================================================}
Function Status : Integer;
Begin
Status := F_Intr_14($0300);
End;
{========================================================================}
Function CD : Boolean;
Begin
If (F_Intr_14($0300) And $0080) = $0080 Then CD := True Else CD := False;
End;
{========================================================================}
Procedure ClearReceiveBuffer;
Begin
P_Intr_14($0A,$00);
End;
{========================================================================}
Begin
End.
{========================================================================}